PROCESS = process_main.c
PROCESS_H = process.h

THREAD_POOL_C = thread_pool.c
THREAD_POOL_CPP = thread_pool.cpp


.PHONY: all clean

all: process c_thread_pool cpp_thread_pool sock

process: ${PROCESS}
	gcc $<.exe -g -O0 -Wall -rdynamic $@ -lpthread

c_thread_pool: ${THREAD_POOL_C}
	gcc -g -O0 -Wall -rdynamic -lpthread $< -o $@.exe

cpp_thread_pool: ${THREAD_POOL_CPP}
	gcc -std=c++11 -g -O0 -Wall -rdynamic -lpthread $< -o $@.exe 2> err.log

sock:
	g++ -g -O0 -Wall -rdynamic -lpthread server.cpp thread_pool.c -o server.exe
	g++ -g -O0 -Wall -rdynamic -lpthread client.cpp thread_pool.c -o client.exe

clean:
	rm -rf *.o *.exe
